package com.comcast.util;

import java.util.Iterator;

public interface ConfigurationManager extends Configurable {
	
	public static final String DEFAULT_CONFIGURATION_MANGER_BEAN_NAME = "ConfigurationManager";
    //add more operations which should be exposed via JMX
    /**
     * Gets the property value associated with the given property name. If the 
     * property name doesn't map to an existing property, the default value is returned.
     * 
     * @param name - the property name
     * @param defaultValue - default property value
     * @return The associated property value if property name is found and 
     * has valid format, default value otherwise.
     */
    public String getProperty(String key, String defaultValue); 
    
    public Iterator<?> getKeys();
    
    /**
     * Retrieves an array of property values.
     * 
     * @param name property name
     * @return an array of property values or empty array if there is no 
     * property associated with the specified property name.
     */
    public String[] getStringArray(String name);
    
    public boolean getBoolean(String name, boolean defaultValue);
    public Boolean getBoolean(String name, Boolean defaultValue);
    
    public int getInt(String name, int defaultValue);
    public Integer getInteger(String name, Integer defaultValue);
    
    public long getLong(String name, long defaultValue);
    public Long getLong(String name, Long defaultValue);
    
    public Float getFloat(String name, Float defaultValue);
    public float getFloat(String name, float defaultValue);
    
    public Double getDouble(String name, Double defaultValue);
    public double getDouble(String name, double defaultValue);

}
